package angryBirds;

/*
 * 父类：抽象鸟类
 */

public abstract class Bird {
	// 鸟叫的方式
	ShoutAbility shoutAbility;

	// 鸟类的构造方法，用来初始化鸟叫的行为
	public Bird(ShoutAbility shoutAbility) {
		this.shoutAbility = shoutAbility;
	}

	// 叫
	public void shout() {
		shoutAbility.shout();
	}

	// 飞行
	public abstract void fly();

	// 攻击
	public abstract void attack();

}
